package io.esirong.widget.picker;

import android.annotation.TargetApi;
import android.content.Context;
import android.os.Build;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import io.esirong.widget.R;
import io.esirong.widget.wheel.WheelView;

/**
 * 日期+时间选择器
 * 选择日期，选择时间
 */
public class DateTimePicker extends FrameLayout {

    /*
     * 控制选择全日期时间
     * 控制选择未来的时间
     * 控制选择过去的时间（生日的选择）
     * 个性化需求：
     */

    private WheelView mYearPicker;
    private WheelView mMonthPicker;
    private WheelView mDayPicker;
    private WheelView mHourPicker;
    private WheelView mMinutePicker;
    private WheelView mSecondPicker;


    public DateTimePicker(@NonNull Context context) {
        this(context, null);
    }

    public DateTimePicker(@NonNull Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public DateTimePicker(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        init(context, attrs);
    }


    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    public DateTimePicker(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) {
        super(context, attrs, defStyleAttr, defStyleRes);
        init(context, attrs);
    }

    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
    private void init(Context context, AttributeSet attrs) {
        LayoutInflater.from(context).inflate(R.layout.layout_date_time_picker, this, true);
    }

    //设计帮助类，管理这时间的逻辑=====================
}
